<script>
export default {
    computed: {
        active(){
            return this.$route.path
        }
    }
}
</script>

<template>
    <header>
        <div class="banxin container">
            <img height="50" src="http://codesohigh.com/logo.png" alt />
            <el-menu
                :default-active="active"
                mode="horizontal"
                background-color="#545c64"
                text-color="#fff"
                active-text-color="#ffd04b"
                router
                :ellipsis="false"
            >
                <el-menu-item index="/">首页</el-menu-item>
                <el-menu-item index="/info" disabled>企业讯息</el-menu-item>
                <el-menu-item index="/list">文章列表</el-menu-item>
                <el-menu-item index="/contact">联系我们</el-menu-item>
            </el-menu>
        </div>
    </header>
</template>

<style lang="less" scoped>
header {
    background: #545c64;
    .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
</style>